#include <vector>
#include <cstring>
#include <algorithm>

using namespace std;
class Bonus
{
public:
    int getMost(vector<vector<int>> board)
    {
        int f[6][6];
        for (int i = 0; i <= board.size(); ++i)
        {
            for (int j = 0; j <= board[i].size(); ++j)
            {
                if (i == 0 && j == 0)
                {
                    f[i][j] = board[i][j];
                }
                if (i)
                {
                    f[i][j] = max(f[i][j], f[i - 1][j] + board[i][j]);
                }
                if (j)
                {
                    f[i][j] = max(f[i][j], f[i][j - 1] + board[i][j]);
                }
            }
        }
        return f[5][5];
    }
};